package com.myharos.fingerguessing;

import com.myharos.fingerguessing.utils.LogUtil;
import ohos.ace.ability.AceAbility;
import ohos.aafwk.content.Intent;
import ohos.agp.window.service.WindowManager;
import ohos.bundle.IBundleManager;
import ohos.security.SystemPermission;

public class MainAbility extends AceAbility {
    @Override
    public void onStart(Intent intent) {
        setWindowBackgroundColor(0,0,0);
        setColorMode(0);
        getWindow().addFlags(WindowManager.LayoutConfig.MARK_TRANSLUCENT_STATUS);
        getWindow().addFlags(WindowManager.LayoutConfig.MARK_TRANSLUCENT_NAVIGATION);

        LogUtil.error("CS","MainAbility——>onStart");
        if(intent.getBooleanParam("toGame", false)){
            setPageParams("pages/play/play", null);
        }
        super.onStart(intent);
        if(verifySelfPermission(SystemPermission.DISTRIBUTED_DATASYNC) == IBundleManager.PERMISSION_DENIED){
            requestPermissionsFromUser(new String[]{SystemPermission.DISTRIBUTED_DATASYNC}, 0);
        }
    }

    @Override
    public void onStop() {
        super.onStop();
    }
}
